﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0058)http://msdn.microsoft.com/zh-cn/architecture/bb613591.aspx -->
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD id=ctl00_Head><TITLE>优化性能：二维图形和图像处理</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8"><LINK 
id=ctl00_HeaderLink href="优化性能：二维图形和图像处理.files/Msdn10-bn20091211.css" 
type=text/css rel=stylesheet><LINK 
href="优化性能：二维图形和图像处理.files/Msdn10.ie6-bn20091211.css" type=text/css 
rel=stylesheet>
<META 
content=http://msdn.microsoft.com/zh-cn/architecture(d=default)/bb613591(l=zh-cn,v=VS.90).aspx 
name=NormalizedUrl>
<META 
content=http://msdn.microsoft.com/zh-cn/architecture(d=default)/bb613591(l=zh-cn,v=VS.90).aspx 
name=VotingContextUrl>
<META content=NOINDEX,NOFOLLOW name=ROBOTS>
<META content="B9D26F3F-9:53:55 PM" name=MN>
<META content=zh-cn name=ms.locale>
<META content=bb613591 name=Search.ShortId><!-- Looking for metadata? Use the robot view instead http://currentsite/currenturl(robot).aspx --><LINK 
href="优化性能：二维图形和图像处理.files/CAYNG1EJ.css" type=text/css 
rel=stylesheet></LINK><LINK media=print 
href="/zh-cn/architecture/bb613591(printer).aspx" rel=alternate>
<META content="MSHTML 6.00.2900.5897" name=GENERATOR></HEAD>
<BODY class=MsdnPageBody id=ctl00_MTPS_Body dir=ltr>
<FORM id=aspnetForm name=aspnetForm action=bb613591.aspx method=post>
<DIV><INPUT id=flag type=hidden value=false name=flag> <INPUT id=__EVENTTARGET 
type=hidden name=__EVENTTARGET> <INPUT id=__EVENTARGUMENT type=hidden 
name=__EVENTARGUMENT> <INPUT id=__VIEWSTATE type=hidden 
value=/wEPDwUBMGQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgEFImN0bDAwJE1hc3RoZWFkJFNlYXJjaCRTZWFyY2hCdXR0b25pGDPKlIV4WUXFA74Qc4U2A1boQA== 
name=__VIEWSTATE> </DIV>
<SCRIPT type=text/javascript>
//<![CDATA[
var theForm = document.forms['aspnetForm'];
if (!theForm) {
    theForm = document.aspnetForm;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</SCRIPT>

<SCRIPT src="优化性能：二维图形和图像处理.files/WebResource.axd" 
type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript>
//<![CDATA[
var CurUserId="AxUFAAAAAAC3CAAAyIkPb6xN3OIVR2+t760eXA!!";var ClientURL="http%3a%2f%2fmsdn.microsoft.com%2fzh-cn%2farchitecture(d%3ddefault)%2fbb613591(l%3dzh-cn%2cv%3dVS.90).aspx";var maxRating=5;var RatingObjId="ctl00_tb1_Flyout_Rating1";var tbCommentsId="ctl00_tb1_Flyout_tbComments";var PageId="bb613591";var pageTag="contentRatingbb613591VS.90zh-cn";var sendBtnId="ctl00_tb1_Flyout_btnSend";var curRating="0";var contentRated=false;var RatingTooltipText="请单击星形符号并提供反馈";var RatedTooltipText="您已经为此内容评级。感谢您的反馈。";var userIPAddress="124.72.10.253";var MtpsPageDirection="ltr";var RatingFlyoutID="ctl00_tb1_Flyout";var Rating_Device="default";var CCI_DeleteConfirmationText="是否确实要删除？";function wkAddNewItemClick(){CCE_EditAnnotation(-1);};
var CCS_AddLinkID="ctl00_WikiContent_Add";var CCS_User="";var CCS_ContentUrl="http://msdn.microsoft.com/zh-cn/architecture/bb613591.aspx";//]]>
</SCRIPT>

<SCRIPT src="优化性能：二维图形和图像处理.files/jquery-1.2.6-bn20091211.js" 
type=text/javascript></SCRIPT>

<SCRIPT src="优化性能：二维图形和图像处理.files/Silverlight-bn20091211.js" 
type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript>
//<![CDATA[
var wt_nvr_ru = "WT_NVR_RU";var wt_fpcdom = ".microsoft.com";var wt_domlist = "msdn.microsoft.com";var wt_pathlist = "";var wt_paramlist = "DCSext.mtps_devcenter";var wt_siteid = "MSDN";var gDomain="m.webtrends.com";
var gDcsId="dcsmgru7m99k7mqmgrhudo0k8_8c6m";
var gFpc="WT_FPC";
/*<![CDATA[*/
if(document.cookie.indexOf(gFpc+"=")==-1){document.write("<scr"+"ipt type='text/javascript' src='"+"http"+(window.location.protocol.indexOf('https:')==0?'s':'')+"://"+gDomain+"/"+gDcsId+"/wtid.js"+"'><\/scr"+"ipt>");}
/*]]>*/
var detectedLocale = 'zh-cn';
var wtsp="_architecture_";
var gTrackEvents = 0;
var omni_guid='bf462954-19c6-4b8b-baa3-4733546362b0';//]]>
</SCRIPT>

<SCRIPT language=JavaScript 
src="优化性能：二维图形和图像处理.files/omni_rsid_msdn-bn20091211.js"></SCRIPT>
<NOSCRIPT><A title="Web Analytics" href="http://www.omniture.com/"><IMG height=1 
alt="" src="优化性能：二维图形和图像处理.files/0.gif" width=1 border=0></A></NOSCRIPT>
<SCRIPT type=text/javascript>
//<![CDATA[
var CCT_Browse="浏览其他包含此标记的主题";var CCT_Remove="从本主题删除该标记";var CCT_NoTags="未输入任何标记";var CCT_Error="发生错误";var CCT_BugTag="contentbug";var CCE_ErrSameContent = "内容尚未更改";
var CCE_ErrEmptyTitle = "标题不能为空";
var CCE_ErrEmptyContent = "内容不能为空";
var CCE_ErrTitleTooLong = "标题不得超过 100 个字符";
var CCE_ErrContentTooLong = "内容不得超过 50,000 个字符";
var CCE_ErrServerError = "保存您的数据时出错。";
var CCE_IsEditing=false;var CCE_IsTaggingEnabled=true;var CCE_TitleMaxLen=100;var CCE_ContentMaxLen=50000;var CCE_UpdateText="请稍候";//]]>
</SCRIPT>

<SCRIPT src="优化性能：二维图形和图像处理.files/compositejscript2.js" 
type=text/javascript></SCRIPT>
 
<DIV><INPUT id=__PREVIOUSPAGE type=hidden 
value=XeR4tuxqcLUvnLdO8-8Ms4LrLIJhqomC3tjD0yoLCuOgAToOSg0-7JyaLngmMT9L0 
name=__PREVIOUSPAGE> </DIV>
<SCRIPT type=text/javascript>
//<![CDATA[
Sys.WebForms.PageRequestManager._initialize('ctl00$ScriptManager', document.getElementById('aspnetForm'));
Sys.WebForms.PageRequestManager.getInstance()._updateControls(['fctl00$WikiContent$ctl00$ItemUpdatePanel'], [], [], 90);
//]]>
</SCRIPT>

<DIV id=Msdn10Background>
<DIV id=JelloSizer>
<DIV id=JelloExpander>
<DIV id=JelloWrapper>
<DIV class=Clear></DIV>
<DIV class=Masthead>
<DIV class=BrandLogo id=ctl00_Masthead_brandLogo><A id=ctl00_Masthead_brandlink 
title="MSDN Solution Architecture Center" 
href="http://msdn.microsoft.com/zh-cn/architecture/default.aspx">MSDN Solution 
Architecture Center</A> </DIV>
<DIV class=Search>
<DIV class=SearchBox id=ctl00_Masthead_Search_SearchBox><INPUT 
class=TextBoxSearch id=ctl00_Masthead_Search_SearchTextBox title="搜索 MSDN" 
name=ctl00$Masthead$Search$SearchTextBox> <INPUT class=SearchButton 
id=ctl00_Masthead_Search_SearchButton title=单击此处开始搜索 
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
type=image alt=单击此处开始搜索 src="优化性能：二维图形和图像处理.files/clear.gif" 
name=ctl00$Masthead$Search$SearchButton> <SPAN class=Bing></SPAN>
<SCRIPT id=mscom.srch.searchBox src="优化性能：二维图形和图像处理.files/SearchBox.jss" defer 
type=text/javascript></SCRIPT>
</DIV></DIV>
<DIV class=GlobalBar>
<DIV class=PassportScarab id=ctl00_Masthead_passportScarab><A id=idPPScarab 
onclick="MtpsLoginStatus.OverlayImagePath = &quot;http://i.msdn.microsoft.com:80/Platform/Controls/StoMtpsLoginStatus/resources/veil.gif&quot;; return MtpsLoginStatus.DoPassportSignIn('http://login.live.com/login.srf?wa=wsignin1.0&amp;rpsnv=11&amp;ct=1262757235&amp;rver=6.0.5276.0&amp;wp=MCLBI&amp;wlcxt=msdn%24msdn%24msdn&amp;wreply=http:%2F%2Fmsdn.microsoft.com%2FPlatform%2FControls%2FStoMtpsLoginStatus%2FPassport%2Fppsignin.htm&amp;lc=2052&amp;id=254354');" 
href="http://login.live.com/login.srf?wa=wsignin1.0&amp;rpsnv=11&amp;ct=1262757235&amp;rver=6.0.5276.0&amp;wp=MCLBI&amp;wlcxt=msdn%24msdn%24msdn&amp;wreply=http:%2F%2Fmsdn.microsoft.com%2Fzh-cn%2Farchitecture%2Fbb613591.aspx&amp;lc=2052&amp;id=254354"><SPAN 
class=MTPS_GlobalToolbarLinks_msdn id=idPPScarabSIT>登录</SPAN></A> 
<DIV id=idPPMWOverlay style="DISPLAY: none"></DIV></DIV>
<DIV class=LocaleFlyout>
<DIV id=MainDiv onmouseover=FlyoutPopupShow() onmouseout=FlyoutPopupHide()>
<DIV id=FlyoutTop><A class=LocaleManagementFlyoutStaticLink 
id=ctl00_Masthead_LocaleManagement_linkCountryLanguage 
style="DISPLAY: inline-block; WIDTH: 150px">中国 - 简体中文&nbsp;</A> <IMG 
class=LocaleManagementFlyoutPopArrow id=img_Arrow 
src="优化性能：二维图形和图像处理.files/clear.gif"> </DIV>
<DIV class=LocaleManagementFlyoutPopup id=FlyoutPopup>
<TABLE width=150 border=0>
  <TBODY>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_Arg 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_Arg','')">Argentina 
      (Español)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_Bra 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_Bra','')">Brasil 
      (Português)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_CanE 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_CanE','')">Canada 
      (English)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_CanF 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_CanF','')">Canada 
      (Français)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_Chi 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_Chi','')">中国 
      (简体中文)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_Col 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_Col','')">Colombia 
      (Español)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_Deu 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_Deu','')">Deutschland 
      (Deutsch)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_Esp 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_Esp','')">España 
      (Español)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_Fra 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_Fra','')">France 
      (Français)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_Ind 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_Ind','')">India 
      (English)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_Ita 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_Ita','')">Italia 
      (Italiano)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_Jpa 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_Jpa','')">日本 
      (日本語)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_Kor 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_Kor','')">한국 
      (한국어)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_Mex 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_Mex','')">México 
      (Español)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_Per 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_Per','')">Perú 
      (Español)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_Рос 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_Рос','')">Россия 
      (Pусский)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_Tai 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_Tai','')">台灣 
      (繁體中文)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_UK 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_UK','')">United 
      Kingdom (English)</A></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_US 
      href="javascript:__doPostBack('ctl00$Masthead$LocaleManagement$lkbtn_US','')">United 
      States (English)</A></TD></TR>
  <TR>
    <TD class=LocaleManagementFlyoutPopupHr></TD></TR>
  <TR>
    <TD><A id=ctl00_Masthead_LocaleManagement_lkbtn_More 
      href='javascript:WebForm_DoPostBackWithOptions(new%20WebForm_PostBackOptions("ctl00$Masthead$LocaleManagement$lkbtn_More",%20"",%20false,%20"",%20"/zh-cn/ms376822.aspx",%20false,%20true))'>更多 
      </A></TD></TR></TBODY></TABLE></DIV></DIV></DIV>
<DIV class=Clear></DIV>
<DIV class=UserName id=ctl00_Masthead_ProfileLink_UserName></DIV></DIV>
<DIV class=Clear></DIV>
<DIV class=NetworkLogo id=ctl00_Masthead_networkTagLineArea><A 
id=ctl00_Masthead_networkLink 
href="http://msdn.microsoft.com/zh-cn/default.aspx"><IMG 
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
src="优化性能：二维图形和图像处理.files/logo_msdn.gif"></A> </DIV>
<DIV class=leftcap></DIV>
<DIV class=internav>
<DIV id=ctl00_Masthead_tabs_manTabsHolder><A id=ctl00_Masthead_tabs_ctl01 
onclick="javascript:Track('|TabStrip Link|ctl00_Masthead_tabs_ctl00|ctl00_Masthead_tabs_ctl01',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/default.aspx">架构师中心</A><A 
id=ctl00_Masthead_tabs_ctl03 
onclick="javascript:Track('|TabStrip Link|ctl00_Masthead_tabs_ctl02|ctl00_Masthead_tabs_ctl03',this);" 
href="http://msdn.microsoft.com/zh-cn/flash/default.aspx">MSDN Flash</A><A 
id=ctl00_Masthead_tabs_ctl05 
onclick="javascript:Track('|TabStrip Link|ctl00_Masthead_tabs_ctl04|ctl00_Masthead_tabs_ctl05',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/aa718325.aspx">Visual Studio 
2005</A></DIV></DIV>
<DIV class=rightcap></DIV>
<DIV class=Clear></DIV></DIV>
<DIV class=Clear></DIV>
<DIV class=topleftcorner></DIV>
<DIV class=toprightcorner></DIV>
<DIV class=alley>
<DIV class=wrapper>
<DIV class=inner>
<DIV class=Clear></DIV>
<DIV class=EyebrowContainer id=ctl00_EyebrowMenu_EyebrowContainer><SPAN 
class=EyebrowElement>&nbsp;二维图形和图像处理</SPAN></DIV>
<DIV class=Clear></DIV>
<DIV id=ctl00_MtpsContentPanel>
<DIV class=topic>
<DIV class=majorTitle>Windows Presentation Foundation<!----></DIV>
<DIV class=title>优化性能：二维图形和图像处理<!----></DIV><!--
      Content type: Devdiv1. Transform: orcas2mtps.xslt.
    -->
<DIV id=mainSection>
<DIV id=mainBody>
<P>
<P><SPAN style="COLOR: darkgray">更新：2007 年 11 月</SPAN></P>
<DIV class=introduction>
<P>WPF 提供了多种二维图形和图像处理功能，可以针对您的应用程序要求优化这些功能。本主题提供有关二维图形和图像处理性能优化的信息。</P>
<P></P>
<P>本主题包括下列各节。</P>
<UL>
  <LI><A id=ctl00_mainContentContainer_ctl01 
  onclick="javascript:Track('ctl00_mainContentContainer_ctl00|ctl00_mainContentContainer_ctl01',this);" 
  href="http://msdn.microsoft.com/zh-cn/architecture/bb613591.aspx#Drawing_and_Shapes">绘图和形状</A>
  <LI><A id=ctl00_mainContentContainer_ctl02 
  onclick="javascript:Track('ctl00_mainContentContainer_ctl00|ctl00_mainContentContainer_ctl02',this);" 
  href="http://msdn.microsoft.com/zh-cn/architecture/bb613591.aspx#StreamGeometry_Objects">StreamGeometry 
  对象</A>
  <LI><A id=ctl00_mainContentContainer_ctl03 
  onclick="javascript:Track('ctl00_mainContentContainer_ctl00|ctl00_mainContentContainer_ctl03',this);" 
  href="http://msdn.microsoft.com/zh-cn/architecture/bb613591.aspx#DrawingVisual_Objects">DrawingVisual 
  对象</A>
  <LI><A id=ctl00_mainContentContainer_ctl04 
  onclick="javascript:Track('ctl00_mainContentContainer_ctl00|ctl00_mainContentContainer_ctl04',this);" 
  href="http://msdn.microsoft.com/zh-cn/architecture/bb613591.aspx#Images">图像</A>
  <LI><A 
  href="http://msdn.microsoft.com/zh-cn/architecture/bb613591.aspx#seeAlsoSection">相关主题</A></LI></UL></DIV><A 
name=Drawing_and_Shapes><!----></A><SPAN>
<DIV class=MTPS_CollapsibleRegion>
<DIV class=CollapseRegionLink><!-- ApplyClick with current id --><IMG 
class=LibC_o 
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; VERTICAL-ALIGN: middle; BORDER-RIGHT-WIDTH: 0px" 
src="优化性能：二维图形和图像处理.files/clear.gif"> &nbsp;绘图和形状 </DIV>
<DIV class=MTPS_CollapsibleSection style="DISPLAY: block"><A 
name=sectionToggle0><!----></A>
<P>WPF 提供了 <SPAN target="T:System.Windows.Media.Drawing" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl00 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl00',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.drawing.aspx">Drawing</A></SPAN> 
和 <SPAN target="T:System.Windows.Shapes.Shape" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl01 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl01',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.shapes.shape.aspx">Shape</A></SPAN> 
这两个对象以表示绘图内容。不过，<SPAN target="T:System.Windows.Media.Drawing" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl02 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl02',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.drawing.aspx">Drawing</A></SPAN> 
对象比 <SPAN target="T:System.Windows.Shapes.Shape" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl03 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl03',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.shapes.shape.aspx">Shape</A></SPAN> 
对象结构简单并且性能特性更为优良。</P>
<P>使用 <SPAN target="T:System.Windows.Shapes.Shape" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl04 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl04',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.shapes.shape.aspx">Shape</A></SPAN>，可以在屏幕上绘制图形形状。由于 
<SPAN target="T:System.Windows.Shapes.Shape" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl05 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl05',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.shapes.shape.aspx">Shape</A></SPAN> 
对象派生于 <SPAN target="T:System.Windows.FrameworkElement" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl06 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl06',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.frameworkelement.aspx">FrameworkElement</A></SPAN> 
类，因此它们可以在面板和大多数控件中使用。</P>
<P>WPF 提供了对图形和呈现服务的若干层访问。在顶层，<SPAN target="T:System.Windows.Shapes.Shape" 
sdata="cer"><A id=ctl00_mainContentContainer_ctl106_ctl00_ctl07 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl07',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.shapes.shape.aspx">Shape</A></SPAN> 
对象很容易使用，并且提供了许多有用的功能，例如布局和事件处理。WPF 提供了大量随时可用的形状对象。所有形状对象都是从 <SPAN 
target="T:System.Windows.Shapes.Shape" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl08 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl08',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.shapes.shape.aspx">Shape</A></SPAN> 
类继承的。可用的形状对象有 <SPAN target="T:System.Windows.Shapes.Ellipse" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl09 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl09',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.shapes.ellipse.aspx">Ellipse</A></SPAN>、<SPAN 
target="T:System.Windows.Shapes.Line" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl10 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl10',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.shapes.line.aspx">Line</A></SPAN>、<SPAN 
target="T:System.Windows.Shapes.Path" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl11 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl11',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.shapes.path.aspx">Path</A></SPAN>、<SPAN 
target="T:System.Windows.Shapes.Polygon" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl12 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl12',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.shapes.polygon.aspx">Polygon</A></SPAN>、<SPAN 
target="T:System.Windows.Shapes.Polyline" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl13 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl13',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.shapes.polyline.aspx">Polyline</A></SPAN> 
和 <SPAN target="T:System.Windows.Shapes.Rectangle" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl14 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl14',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.shapes.rectangle.aspx">Rectangle</A></SPAN>。</P>
<P><SPAN target="T:System.Windows.Media.Drawing" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl15 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl15',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.drawing.aspx">Drawing</A></SPAN> 
对象不是派生自 <SPAN target="T:System.Windows.FrameworkElement" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl16 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl16',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.frameworkelement.aspx">FrameworkElement</A></SPAN> 
类，相比而言它更轻量地实现形状、图像和文本的呈现。</P>
<P>有以下四种类型的 <SPAN target="T:System.Windows.Media.Drawing" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl17 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl17',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.drawing.aspx">Drawing</A></SPAN> 
对象：</P>
<UL>
  <LI>
  <P><SPAN target="T:System.Windows.Media.GeometryDrawing" sdata="cer"><A 
  id=ctl00_mainContentContainer_ctl106_ctl00_ctl18 
  onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl18',this);" 
  href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.geometrydrawing.aspx">GeometryDrawing</A></SPAN>：绘制形状。</P>
  <LI>
  <P><SPAN target="T:System.Windows.Media.ImageDrawing" sdata="cer"><A 
  id=ctl00_mainContentContainer_ctl106_ctl00_ctl19 
  onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl19',this);" 
  href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.imagedrawing.aspx">ImageDrawing</A></SPAN>：绘制图像。</P>
  <LI>
  <P><SPAN target="T:System.Windows.Media.GlyphRunDrawing" sdata="cer"><A 
  id=ctl00_mainContentContainer_ctl106_ctl00_ctl20 
  onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl20',this);" 
  href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.glyphrundrawing.aspx">GlyphRunDrawing</A></SPAN>：绘制文本。</P>
  <LI>
  <P><SPAN target="T:System.Windows.Media.DrawingGroup" sdata="cer"><A 
  id=ctl00_mainContentContainer_ctl106_ctl00_ctl21 
  onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl21',this);" 
  href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.drawinggroup.aspx">DrawingGroup</A></SPAN>：绘制其他绘图。使用绘图组可以将其他绘图组合成一个复合绘图。</P></LI></UL>
<P><SPAN target="T:System.Windows.Media.GeometryDrawing" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl22 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl22',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.geometrydrawing.aspx">GeometryDrawing</A></SPAN> 
对象用于呈现几何图形内容。<SPAN target="T:System.Windows.Media.Geometry" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl23 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl23',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.geometry.aspx">Geometry</A></SPAN> 
类以及从中派生的具体类（如 <SPAN target="T:System.Windows.Media.CombinedGeometry" 
sdata="cer"><A id=ctl00_mainContentContainer_ctl106_ctl00_ctl24 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl24',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.combinedgeometry.aspx">CombinedGeometry</A></SPAN>、<SPAN 
target="T:System.Windows.Media.EllipseGeometry" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl25 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl25',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.ellipsegeometry.aspx">EllipseGeometry</A></SPAN> 
和 <SPAN target="T:System.Windows.Media.PathGeometry" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl26 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl26',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.pathgeometry.aspx">PathGeometry</A></SPAN>）提供二维图形的呈现方式，此外还提供命中测试和剪辑支持。例如，Geometry 
对象可用于定义控件的区域，或者定义要应用到图像的剪辑区域。Geometry 
对象可以是简单的区域（如矩形和圆形），也可以是基于两个或多个几何图形对象创建的复合区域。通过组合 <SPAN 
target="T:System.Windows.Media.PathSegment" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl27 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl27',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.pathsegment.aspx">PathSegment</A></SPAN> 
派生的对象（例如 <SPAN target="T:System.Windows.Media.ArcSegment" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl28 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl28',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.arcsegment.aspx">ArcSegment</A></SPAN>、<SPAN 
target="T:System.Windows.Media.BezierSegment" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl29 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl29',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.beziersegment.aspx">BezierSegment</A></SPAN> 
和 <SPAN target="T:System.Windows.Media.QuadraticBezierSegment" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl30 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl30',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.quadraticbeziersegment.aspx">QuadraticBezierSegment</A></SPAN>），可以创建较复杂的几何图形区域。</P>
<P>从表面上看，<SPAN target="T:System.Windows.Media.Geometry" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl31 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl31',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.geometry.aspx">Geometry</A></SPAN> 
类和 <SPAN target="T:System.Windows.Shapes.Shape" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl32 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl32',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.shapes.shape.aspx">Shape</A></SPAN> 
类十分相似。它们都可用来呈现二维图形，并且从其自身派生的具体类也很相似，例如 <SPAN 
target="T:System.Windows.Media.EllipseGeometry" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl33 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl33',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.ellipsegeometry.aspx">EllipseGeometry</A></SPAN> 
和 <SPAN target="T:System.Windows.Shapes.Ellipse" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl34 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl34',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.shapes.ellipse.aspx">Ellipse</A></SPAN>。然而，这两种类之间存在着重大差异。其中有一个差异就是 
<SPAN target="T:System.Windows.Media.Geometry" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl35 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl35',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.geometry.aspx">Geometry</A></SPAN> 
类没有 <SPAN target="T:System.Windows.Shapes.Shape" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl36 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl36',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.shapes.shape.aspx">Shape</A></SPAN> 
类的某些功能，例如自行绘制的功能。若要绘制一个几何图形对象，必须使用其他类（例如 DrawingContext、Drawing 或 Path，需要注意 Path 
是一种 
Shape）来执行此绘制操作。诸如填充、笔画和笔画粗细之类的呈现属性针对绘制此几何图形对象的类，而形状对象包括这些属性。可以这样来理解此差异：几何图形对象定义一个区域（如圆形），而形状对象不仅定义一个区域，还定义如何填充和描绘此区域并参与布局系统。</P>
<P>由于 <SPAN target="T:System.Windows.Shapes.Shape" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl37 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl37',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.shapes.shape.aspx">Shape</A></SPAN> 
对象派生自 <SPAN target="T:System.Windows.FrameworkElement" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl38 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl38',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.frameworkelement.aspx">FrameworkElement</A></SPAN> 
类，因此使用此对象会大大增加应用程序的内存消耗。如果事实上您的图形内容无需使用 <SPAN 
target="T:System.Windows.FrameworkElement" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl39 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl39',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.frameworkelement.aspx">FrameworkElement</A></SPAN> 
功能，则可以考虑使用轻量的 <SPAN target="T:System.Windows.Media.Drawing" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl40 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl40',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.drawing.aspx">Drawing</A></SPAN> 
对象。</P>
<P>有关 <SPAN target="T:System.Windows.Media.Drawing" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl41 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl41',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.drawing.aspx">Drawing</A></SPAN> 
对象的更多信息，请参见 <SPAN sdata="link"><A 
id=ctl00_mainContentContainer_ctl106_ctl00_ctl42 
onclick="javascript:Track('ctl00_mainContentContainer_ctl106_ctl00_contenthere|ctl00_mainContentContainer_ctl106_ctl00_ctl42',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/ms751619.aspx">Drawing 
对象概述</A></SPAN>。</P></DIV></DIV></SPAN><A 
name=StreamGeometry_Objects><!----></A><SPAN>
<DIV class=MTPS_CollapsibleRegion>
<DIV class=CollapseRegionLink><!-- ApplyClick with current id --><IMG 
class=LibC_o 
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; VERTICAL-ALIGN: middle; BORDER-RIGHT-WIDTH: 0px" 
src="优化性能：二维图形和图像处理.files/clear.gif"> &nbsp;StreamGeometry 对象 </DIV>
<DIV class=MTPS_CollapsibleSection style="DISPLAY: block"><A 
name=sectionToggle1><!----></A>
<P><SPAN target="T:System.Windows.Media.StreamGeometry" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl107_ctl00_ctl00 
onclick="javascript:Track('ctl00_mainContentContainer_ctl107_ctl00_contenthere|ctl00_mainContentContainer_ctl107_ctl00_ctl00',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.streamgeometry.aspx">StreamGeometry</A></SPAN> 
对象是 <SPAN target="T:System.Windows.Media.PathGeometry" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl107_ctl00_ctl01 
onclick="javascript:Track('ctl00_mainContentContainer_ctl107_ctl00_contenthere|ctl00_mainContentContainer_ctl107_ctl00_ctl01',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.pathgeometry.aspx">PathGeometry</A></SPAN> 
的一个轻量替代品，可用于创建几何形状。若要描述复杂的几何图形，请使用 <SPAN 
target="T:System.Windows.Media.StreamGeometry" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl107_ctl00_ctl02 
onclick="javascript:Track('ctl00_mainContentContainer_ctl107_ctl00_contenthere|ctl00_mainContentContainer_ctl107_ctl00_ctl02',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.streamgeometry.aspx">StreamGeometry</A></SPAN>。<SPAN 
target="T:System.Windows.Media.StreamGeometry" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl107_ctl00_ctl03 
onclick="javascript:Track('ctl00_mainContentContainer_ctl107_ctl00_contenthere|ctl00_mainContentContainer_ctl107_ctl00_ctl03',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.streamgeometry.aspx">StreamGeometry</A></SPAN> 
是经过优化的，可用于处理多个 <SPAN target="T:System.Windows.Media.PathGeometry" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl107_ctl00_ctl04 
onclick="javascript:Track('ctl00_mainContentContainer_ctl107_ctl00_contenthere|ctl00_mainContentContainer_ctl107_ctl00_ctl04',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.pathgeometry.aspx">PathGeometry</A></SPAN> 
对象，并且相对于使用多个独立的 <SPAN target="T:System.Windows.Media.PathGeometry" 
sdata="cer"><A id=ctl00_mainContentContainer_ctl107_ctl00_ctl05 
onclick="javascript:Track('ctl00_mainContentContainer_ctl107_ctl00_contenthere|ctl00_mainContentContainer_ctl107_ctl00_ctl05',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.pathgeometry.aspx">PathGeometry</A></SPAN> 
对象而言，其执行效率更高。</P>
<P>下面的示例使用属性语法用 XAML 创建一个三角形 <SPAN 
target="T:System.Windows.Media.StreamGeometry" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl107_ctl00_ctl06 
onclick="javascript:Track('ctl00_mainContentContainer_ctl107_ctl00_contenthere|ctl00_mainContentContainer_ctl107_ctl00_ctl06',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.streamgeometry.aspx">StreamGeometry</A></SPAN>。</P>
<DIV name="snippetGroup"><SPAN id=ctl00_mainContentContainer_ctl107_ctl00_ctl07>
<DIV class=libCScode id=ctl00_mainContentContainer_ctl107_ctl00_ctl07_XAML>
<DIV class=CodeSnippetTitleBar>
<DIV class=CodeDisplayLanguage>XAML </DIV>
<DIV class=CopyCodeButton><A class=copyCode title=复制代码 
href="javascript:CopyCode('ctl00_mainContentContainer_ctl107_ctl00_ctl07_code');">
<DIV class=LibC_copy_off 
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; WIDTH: auto; HEIGHT: 9px; BORDER-RIGHT-WIDTH: 0px" 
align=center></DIV>复制代码 </A></DIV></DIV>
<DIV dir=ltr style="BACKGROUND-COLOR: #ddd"><PRE class=libCScode id=ctl00_mainContentContainer_ctl107_ctl00_ctl07_code style="WORD-BREAK: break-all; WORD-WRAP: break-word" space="preserve">&lt;Page xmlns=<SPAN style="COLOR: maroon">"http://schemas.microsoft.com/winfx/2006/xaml/presentation"</SPAN>
  xmlns:x=<SPAN style="COLOR: maroon">"http://schemas.microsoft.com/winfx/2006/xaml"</SPAN>&gt;
  &lt;StackPanel&gt;

    &lt;Path Data=<SPAN style="COLOR: maroon">"F0 M10,100 L100,100 100,50Z"</SPAN> 
      StrokeThickness=<SPAN style="COLOR: maroon">"1"</SPAN> Stroke=<SPAN style="COLOR: maroon">"Black"</SPAN>/&gt;

  &lt;/StackPanel&gt;
&lt;/Page&gt;
</PRE></DIV></DIV></SPAN></DIV>
<P>有关 <SPAN target="T:System.Windows.Media.StreamGeometry" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl107_ctl00_ctl08 
onclick="javascript:Track('ctl00_mainContentContainer_ctl107_ctl00_contenthere|ctl00_mainContentContainer_ctl107_ctl00_ctl08',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.streamgeometry.aspx">StreamGeometry</A></SPAN> 
对象的更多信息，请参见<SPAN sdata="link"><A 
id=ctl00_mainContentContainer_ctl107_ctl00_ctl09 
onclick="javascript:Track('ctl00_mainContentContainer_ctl107_ctl00_contenthere|ctl00_mainContentContainer_ctl107_ctl00_ctl09',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/ms742199.aspx">如何：使用 
StreamGeometry 创建形状</A></SPAN>。</P></DIV></DIV></SPAN><A 
name=DrawingVisual_Objects><!----></A><SPAN>
<DIV class=MTPS_CollapsibleRegion>
<DIV class=CollapseRegionLink><!-- ApplyClick with current id --><IMG 
class=LibC_o 
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; VERTICAL-ALIGN: middle; BORDER-RIGHT-WIDTH: 0px" 
src="优化性能：二维图形和图像处理.files/clear.gif"> &nbsp;DrawingVisual 对象 </DIV>
<DIV class=MTPS_CollapsibleSection style="DISPLAY: block"><A 
name=sectionToggle2><!----></A>
<P><SPAN target="T:System.Windows.Media.DrawingVisual" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl108_ctl00_ctl00 
onclick="javascript:Track('ctl00_mainContentContainer_ctl108_ctl00_contenthere|ctl00_mainContentContainer_ctl108_ctl00_ctl00',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.drawingvisual.aspx">DrawingVisual</A></SPAN> 
对象是一个用于呈现形状、图像或文本的轻量绘图类。此类之所以被视为轻量，是因为它不提供布局或事件处理功能，从而能够改善其性能。因此，绘图最适于背景和剪贴画。有关更多信息，请参见<SPAN 
sdata="link"><A id=ctl00_mainContentContainer_ctl108_ctl00_ctl01 
onclick="javascript:Track('ctl00_mainContentContainer_ctl108_ctl00_contenthere|ctl00_mainContentContainer_ctl108_ctl00_ctl01',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/ms742254.aspx">使用 
DrawingVisual 对象</A></SPAN>。</P></DIV></DIV></SPAN><A 
name=Images><!----></A><SPAN>
<DIV class=MTPS_CollapsibleRegion>
<DIV class=CollapseRegionLink><!-- ApplyClick with current id --><IMG 
class=LibC_o 
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; VERTICAL-ALIGN: middle; BORDER-RIGHT-WIDTH: 0px" 
src="优化性能：二维图形和图像处理.files/clear.gif"> &nbsp;图像 </DIV>
<DIV class=MTPS_CollapsibleSection style="DISPLAY: block"><A 
name=sectionToggle3><!----></A>
<P>与以前版本的 Windows 中的图像处理功能相比，WPF 图像处理功能有很大的改进。图像处理功能（例如在常用控件上显示位图或使用图像）主要由 
Microsoft Windows 图形设备接口 (GDI) 或 Microsoft Windows GDI+ 应用程序编程接口 (API) 来处理。这些 
API 提供了基线图像处理功能，但缺乏诸如编解码器扩展性支持和高保真图像支持之类的功能。WPF 图像处理 API 已进行重新设计以克服 GDI 和 GDI+ 
的缺点，并提供一组新的 API 用于在应用程序中显示和使用图像。</P>
<P>使用图像时，为了获得更好的性能，请考虑下面的建议：</P>
<UL>
  <LI>
  <P>如果应用程序要求您显示缩略图像，则考虑创建此图像的小型版本。默认情况下，WPF 以完整大小加载图像并进行解码。如果您只需要缩略版本的图像，则 WPF 
  不必将图像解码为其完整大小再缩小至缩略图大小。为了避免这种不必要的系统开销，您可以请求 WPF 将图像解码为缩略图大小，或者请求 WPF 
  加载缩略图大小的图像。</P>
  <LI>
  <P>始终将图像解码为所需的大小而不是默认的大小。如上所述，请求 WPF 
  将图像解码为所需的大小，而不是默认的完整大小。这样不仅缩小了应用程序的工作集，而且还提高了执行速度。</P>
  <LI>
  <P>如有可能，可以将多个图像组合成单个图像，例如将多个图像组合成一个幻灯胶片。</P>
  <LI>
  <P>有关更多信息，请参见<SPAN sdata="link"><A 
  id=ctl00_mainContentContainer_ctl109_ctl00_ctl00 
  onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl00',this);" 
  href="http://msdn.microsoft.com/zh-cn/architecture/ms748873.aspx">图像处理概述</A></SPAN>。</P></LI></UL>
<H3 class=subHeading>BitmapScalingMode</H3>
<DIV class=subsection>
<P>在对任意位图的缩放进行动画处理时，默认的高质量图像重新取样算法有时可能会使用过多的系统资源，引起帧速率降级，并导致动画明显变慢。通过将 <SPAN 
target="T:System.Windows.Media.RenderOptions" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl109_ctl00_ctl01 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl01',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.renderoptions.aspx">RenderOptions</A></SPAN> 
对象的 <SPAN target="P:System.Windows.Media.RenderOptions.BitmapScalingMode" 
sdata="cer"><A id=ctl00_mainContentContainer_ctl109_ctl00_ctl02 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl02',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.renderoptions.bitmapscalingmode.aspx">BitmapScalingMode</A></SPAN> 
属性设置为 <SPAN target="F:System.Windows.Media.BitmapScalingMode.LowQuality" 
sdata="cer"><A id=ctl00_mainContentContainer_ctl109_ctl00_ctl03 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl03',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.bitmapscalingmode.lowquality.aspx">LowQuality</A></SPAN>，您可以在缩放位图时创建较为流畅的动画。<SPAN 
target="F:System.Windows.Media.BitmapScalingMode.LowQuality" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl109_ctl00_ctl04 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl04',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.bitmapscalingmode.lowquality.aspx">LowQuality</A></SPAN> 
模式通知 WPF 呈现引擎在处理图像时从质量优化算法切换到速度优化算法。</P>
<P>下面的示例演示如何设置图像对象的 <SPAN target="T:System.Windows.Media.BitmapScalingMode" 
sdata="cer"><A id=ctl00_mainContentContainer_ctl109_ctl00_ctl05 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl05',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.bitmapscalingmode.aspx">BitmapScalingMode</A></SPAN>。</P>
<DIV name="snippetGroup"><SPAN id=ctl00_mainContentContainer_ctl109_ctl00_ctl06>
<DIV class=libCScode id=ctl00_mainContentContainer_ctl109_ctl00_ctl06_CSharp>
<DIV class=CodeSnippetTitleBar>
<DIV class=CodeDisplayLanguage>C# </DIV>
<DIV class=CopyCodeButton><A class=copyCode title=复制代码 
href="javascript:CopyCode('ctl00_mainContentContainer_ctl109_ctl00_ctl06_code');">
<DIV class=LibC_copy_off 
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; WIDTH: auto; HEIGHT: 9px; BORDER-RIGHT-WIDTH: 0px" 
align=center></DIV>复制代码 </A></DIV></DIV>
<DIV dir=ltr style="BACKGROUND-COLOR: #ddd"><PRE class=libCScode id=ctl00_mainContentContainer_ctl109_ctl00_ctl06_code style="WORD-BREAK: break-all; WORD-WRAP: break-word" space="preserve"><SPAN style="COLOR: green">// Set the bitmap scaling mode for the image to render faster.</SPAN>
RenderOptions.SetBitmapScalingMode(MyImage, BitmapScalingMode.LowQuality);
</PRE></DIV></DIV></SPAN></DIV></DIV>
<H3 class=subHeading>CachingHint</H3>
<DIV class=subsection>
<P>默认情况下，WPF 不缓存 <SPAN target="T:System.Windows.Media.TileBrush" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl109_ctl00_ctl07 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl07',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.tilebrush.aspx">TileBrush</A></SPAN> 
对象（例如 <SPAN target="T:System.Windows.Media.DrawingBrush" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl109_ctl00_ctl08 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl08',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.drawingbrush.aspx">DrawingBrush</A></SPAN> 
和 <SPAN target="T:System.Windows.Media.VisualBrush" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl109_ctl00_ctl09 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl09',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.visualbrush.aspx">VisualBrush</A></SPAN>）的已呈现内容。在内容或场景中对 
<SPAN target="T:System.Windows.Media.TileBrush" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl109_ctl00_ctl10 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl10',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.tilebrush.aspx">TileBrush</A></SPAN> 
的使用均不更改的静态情况下，此功能很有用，因为它可以节省视频内存。在以非静态方式使用具有静态内容的 <SPAN 
target="T:System.Windows.Media.TileBrush" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl109_ctl00_ctl11 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl11',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.tilebrush.aspx">TileBrush</A></SPAN> 
时（例如当静态的 <SPAN target="T:System.Windows.Media.DrawingBrush" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl109_ctl00_ctl12 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl12',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.drawingbrush.aspx">DrawingBrush</A></SPAN> 
或 <SPAN target="T:System.Windows.Media.VisualBrush" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl109_ctl00_ctl13 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl13',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.visualbrush.aspx">VisualBrush</A></SPAN> 
映射到旋转三维对象的表面时），此功能的作用不大。WPF 的默认行为是逐帧重新呈现 <SPAN 
target="T:System.Windows.Media.DrawingBrush" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl109_ctl00_ctl14 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl14',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.drawingbrush.aspx">DrawingBrush</A></SPAN> 
或 <SPAN target="T:System.Windows.Media.VisualBrush" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl109_ctl00_ctl15 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl15',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.visualbrush.aspx">VisualBrush</A></SPAN> 
的整个内容，即使内容没有更改也是如此。</P>
<P>通过将 <SPAN target="T:System.Windows.Media.RenderOptions" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl109_ctl00_ctl16 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl16',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.renderoptions.aspx">RenderOptions</A></SPAN> 
对象的 <SPAN target="P:System.Windows.Media.RenderOptions.CachingHint" 
sdata="cer"><A id=ctl00_mainContentContainer_ctl109_ctl00_ctl17 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl17',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.renderoptions.cachinghint.aspx">CachingHint</A></SPAN> 
属性设置为 <SPAN target="F:System.Windows.Media.CachingHint.Cache" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl109_ctl00_ctl18 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl18',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.cachinghint.cache.aspx">Cache</A></SPAN>，可以使用图块画笔对象的缓存版本来提高性能。</P>
<P><SPAN 
target="P:System.Windows.Media.RenderOptions.CacheInvalidationThresholdMinimum" 
sdata="cer"><A id=ctl00_mainContentContainer_ctl109_ctl00_ctl19 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl19',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.renderoptions.cacheinvalidationthresholdminimum.aspx">CacheInvalidationThresholdMinimum</A></SPAN> 
和 <SPAN 
target="P:System.Windows.Media.RenderOptions.CacheInvalidationThresholdMaximum" 
sdata="cer"><A id=ctl00_mainContentContainer_ctl109_ctl00_ctl20 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl20',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.renderoptions.cacheinvalidationthresholdmaximum.aspx">CacheInvalidationThresholdMaximum</A></SPAN> 
属性值是相对大小值，可确定由于缩放比例更改而应重新生成 <SPAN target="T:System.Windows.Media.TileBrush" 
sdata="cer"><A id=ctl00_mainContentContainer_ctl109_ctl00_ctl21 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl21',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.tilebrush.aspx">TileBrush</A></SPAN> 
对象的时间。例如，如果将 <SPAN 
target="P:System.Windows.Media.RenderOptions.CacheInvalidationThresholdMaximum" 
sdata="cer"><A id=ctl00_mainContentContainer_ctl109_ctl00_ctl22 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl22',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.renderoptions.cacheinvalidationthresholdmaximum.aspx">CacheInvalidationThresholdMaximum</A></SPAN> 
属性设置为 2.0，则仅当 <SPAN target="T:System.Windows.Media.TileBrush" sdata="cer"><A 
id=ctl00_mainContentContainer_ctl109_ctl00_ctl23 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl23',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.tilebrush.aspx">TileBrush</A></SPAN> 
的缓存大小超过当前缓存大小的两倍时，才需要重新生成。</P>
<P>下面的示例演示如何将缓存提示选项用于 <SPAN target="T:System.Windows.Media.DrawingBrush" 
sdata="cer"><A id=ctl00_mainContentContainer_ctl109_ctl00_ctl24 
onclick="javascript:Track('ctl00_mainContentContainer_ctl109_ctl00_contenthere|ctl00_mainContentContainer_ctl109_ctl00_ctl24',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/system.windows.media.drawingbrush.aspx">DrawingBrush</A></SPAN>。</P>
<DIV name="snippetGroup"><SPAN id=ctl00_mainContentContainer_ctl109_ctl00_ctl25>
<DIV class=libCScode id=ctl00_mainContentContainer_ctl109_ctl00_ctl25_CSharp>
<DIV class=CodeSnippetTitleBar>
<DIV class=CodeDisplayLanguage>C# </DIV>
<DIV class=CopyCodeButton><A class=copyCode title=复制代码 
href="javascript:CopyCode('ctl00_mainContentContainer_ctl109_ctl00_ctl25_code');">
<DIV class=LibC_copy_off 
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; WIDTH: auto; HEIGHT: 9px; BORDER-RIGHT-WIDTH: 0px" 
align=center></DIV>复制代码 </A></DIV></DIV>
<DIV dir=ltr style="BACKGROUND-COLOR: #ddd"><PRE class=libCScode id=ctl00_mainContentContainer_ctl109_ctl00_ctl25_code style="WORD-BREAK: break-all; WORD-WRAP: break-word" space="preserve"><SPAN style="COLOR: green">// Set the minimum and maximum relative sizes for regenerating the tiled brush.</SPAN>
RenderOptions.SetCacheInvalidationThresholdMinimum(drawingBrush, 0.5);
RenderOptions.SetCacheInvalidationThresholdMaximum(drawingBrush, 2.0);

<SPAN style="COLOR: green">// The tiled brush will be regenerated when the size is</SPAN>
<SPAN style="COLOR: green">//   0.5x, 0.25x (and so forth)</SPAN>
<SPAN style="COLOR: green">// and</SPAN>
<SPAN style="COLOR: green">//   2x, 4x, 8x (and so forth)</SPAN>
<SPAN style="COLOR: green">// of the original size.</SPAN>

<SPAN style="COLOR: green">// Set the caching hint option for the brush.</SPAN>
RenderOptions.SetCachingHint(drawingBrush, CachingHint.Cache);
</PRE></DIV></DIV></SPAN></DIV></DIV></DIV></DIV></SPAN><SPAN>
<DIV class=MTPS_CollapsibleRegion>
<DIV class=CollapseRegionLink><!-- ApplyClick with current id --><IMG 
class=LibC_o 
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; VERTICAL-ALIGN: middle; BORDER-RIGHT-WIDTH: 0px" 
src="优化性能：二维图形和图像处理.files/clear.gif"> &nbsp;请参见 </DIV>
<DIV class=MTPS_CollapsibleSection style="DISPLAY: block"><A name=seeAlsoToggle><!----></A>
<H4 class=subHeading>概念</H4>
<DIV class=seeAlsoStyle><SPAN sdata="link"><A 
id=ctl00_mainContentContainer_ctl110_ctl00_ctl00 
onclick="javascript:Track('ctl00_mainContentContainer_ctl110_ctl00_contenthere|ctl00_mainContentContainer_ctl110_ctl00_ctl00',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/aa970683.aspx">优化 WPF 
应用程序性能</A></SPAN></DIV>
<DIV class=seeAlsoStyle><SPAN sdata="link"><A 
id=ctl00_mainContentContainer_ctl110_ctl00_ctl01 
onclick="javascript:Track('ctl00_mainContentContainer_ctl110_ctl00_contenthere|ctl00_mainContentContainer_ctl110_ctl00_ctl01',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/bb613583.aspx">规划应用程序性能</A></SPAN></DIV>
<DIV class=seeAlsoStyle><SPAN sdata="link"><A 
id=ctl00_mainContentContainer_ctl110_ctl00_ctl02 
onclick="javascript:Track('ctl00_mainContentContainer_ctl110_ctl00_contenthere|ctl00_mainContentContainer_ctl110_ctl00_ctl02',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/bb613578.aspx">优化性能：利用硬件</A></SPAN></DIV>
<DIV class=seeAlsoStyle><SPAN sdata="link"><A 
id=ctl00_mainContentContainer_ctl110_ctl00_ctl03 
onclick="javascript:Track('ctl00_mainContentContainer_ctl110_ctl00_contenthere|ctl00_mainContentContainer_ctl110_ctl00_ctl03',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/bb613542.aspx">优化性能：布局和设计</A></SPAN></DIV>
<DIV class=seeAlsoStyle><SPAN sdata="link"><A 
id=ctl00_mainContentContainer_ctl110_ctl00_ctl04 
onclick="javascript:Track('ctl00_mainContentContainer_ctl110_ctl00_contenthere|ctl00_mainContentContainer_ctl110_ctl00_ctl04',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/bb613565.aspx">优化性能：对象行为</A></SPAN></DIV>
<DIV class=seeAlsoStyle><SPAN sdata="link"><A 
id=ctl00_mainContentContainer_ctl110_ctl00_ctl05 
onclick="javascript:Track('ctl00_mainContentContainer_ctl110_ctl00_contenthere|ctl00_mainContentContainer_ctl110_ctl00_ctl05',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/bb613559.aspx">优化性能：应用程序资源</A></SPAN></DIV>
<DIV class=seeAlsoStyle><SPAN sdata="link"><A 
id=ctl00_mainContentContainer_ctl110_ctl00_ctl06 
onclick="javascript:Track('ctl00_mainContentContainer_ctl110_ctl00_contenthere|ctl00_mainContentContainer_ctl110_ctl00_ctl06',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/bb613560.aspx">优化性能：文本</A></SPAN></DIV>
<DIV class=seeAlsoStyle><SPAN sdata="link"><A 
id=ctl00_mainContentContainer_ctl110_ctl00_ctl07 
onclick="javascript:Track('ctl00_mainContentContainer_ctl110_ctl00_contenthere|ctl00_mainContentContainer_ctl110_ctl00_ctl07',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/bb613546.aspx">优化性能：数据绑定</A></SPAN></DIV>
<DIV class=seeAlsoStyle><SPAN sdata="link"><A 
id=ctl00_mainContentContainer_ctl110_ctl00_ctl08 
onclick="javascript:Track('ctl00_mainContentContainer_ctl110_ctl00_contenthere|ctl00_mainContentContainer_ctl110_ctl00_ctl08',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/bb613584.aspx">优化性能：其他建议</A></SPAN></DIV>
<DIV class=seeAlsoStyle><SPAN sdata="link"><A 
id=ctl00_mainContentContainer_ctl110_ctl00_ctl09 
onclick="javascript:Track('ctl00_mainContentContainer_ctl110_ctl00_contenthere|ctl00_mainContentContainer_ctl110_ctl00_ctl09',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/bb613564.aspx">WPF 
性能工具和资源</A></SPAN></DIV>
<DIV class=seeAlsoStyle><SPAN sdata="link"><A 
id=ctl00_mainContentContainer_ctl110_ctl00_ctl10 
onclick="javascript:Track('ctl00_mainContentContainer_ctl110_ctl00_contenthere|ctl00_mainContentContainer_ctl110_ctl00_ctl10',this);" 
href="http://msdn.microsoft.com/zh-cn/architecture/bb613592.aspx">动画提示和技巧</A></SPAN></DIV></DIV></DIV></SPAN></DIV></DIV></DIV></DIV><SPAN 
id=CommunityContent></SPAN>
<DIV class=CCS_Container id=ctl00_WikiContent_cc>
<DIV class=CCS_TopicTagEditor>
<DIV class=CCT_Panel id=ctl00_WikiContent_TopicTagEditor_panel>
<DIV class=CCT_TagsPanel id=tagsPanel><SPAN class=CCT_Title 
id=ctl00_WikiContent_TopicTagEditor_title>标记</SPAN> <A class=CCT_HelpLink 
id=ctl00_WikiContent_TopicTagEditor_helpLink 
onclick='CCS_ShowHelp("/platform/Controls/CCTagEditor/resources/taghelp.zh-cn.htm",800,600);return false;' 
href="http://msdn.microsoft.com/platform/Controls/CCTagEditor/resources/taghelp.zh-cn.htm"><IMG 
class="CCT_HelpImage LibC_help" id=ctl00_WikiContent_TopicTagEditor_helpImage 
title=这是什么？ alt=这是什么？ src="优化性能：二维图形和图像处理.files/clear.gif"></A>: <SPAN 
class=CCT_Text id=ctl00_WikiContent_TopicTagEditor_tags></SPAN><SPAN 
class=CCT_View id=ctl00_WikiContent_TopicTagEditor_view><A class=CCT_LinkButton 
id=ctl00_WikiContent_TopicTagEditor_addTagLink title=向本主题添加标记 
onclick='return CCT_AddATag("http://msdn.microsoft.com/zh-cn/architecture/Community-Signup.aspx?ru=http%3a%2f%2fmsdn.microsoft.com%2fzh-cn%2farchitecture%2fbb613591(VS.90).aspx",-1);' 
href="http://msdn.microsoft.com/Platform/Controls/CCTagEditor/#">添加标记</A> 
</SPAN><SPAN class=CCT_Edit id=ctl00_WikiContent_TopicTagEditor_editPanel 
style="DISPLAY: none"><INPUT class=CCT_TextBox 
id=ctl00_WikiContent_TopicTagEditor_textbox 
name=ctl00$WikiContent$TopicTagEditor$textbox autocomplete="off"> <A 
class=CCT_LinkButton id=ctl00_WikiContent_TopicTagEditor_addLink title=提交本主题的标记 
onclick="return CCT_AddTags(-1);" 
href="http://msdn.microsoft.com/Platform/Controls/CCTagEditor/#">添加</A> &nbsp; 
<A class=CCT_LinkButton id=ctl00_WikiContent_TopicTagEditor_cancelLink 
title=取消此操作 onclick="return CCT_CancelAddTag(-1);" 
href="http://msdn.microsoft.com/Platform/Controls/CCTagEditor/#">取消</A> 
</SPAN><SPAN class=CCT_Message 
id=ctl00_WikiContent_TopicTagEditor_messagePanel></SPAN></DIV>
<DIV class=CCT_FlagAsPanel id=ctl00_WikiContent_TopicTagEditor_flagAsPanel 
style="DISPLAY: none"><SPAN id=ctl00_WikiContent_TopicTagEditor_flagAsLabel>标记为 
</SPAN><A class=CCT_LinkButton 
id=ctl00_WikiContent_TopicTagEditor_contentBugLink 
title="将此注释标记为 'ContentBug'，作者就知道需要查看这个主题" 
onclick='return CCT_FlagContentBug("http://msdn.microsoft.com/zh-cn/architecture/Community-Signup.aspx?ru=http%3a%2f%2fmsdn.microsoft.com%2fzh-cn%2farchitecture%2fbb613591(VS.90).aspx",-1);' 
href="http://msdn.microsoft.com/Platform/Controls/CCTagEditor/#">ContentBug</A> 
</DIV>
<DIV style="CLEAR: both"></DIV></DIV></DIV>
<DIV class=CCS_WikiLogo><IMG class=LibC_wiki id=ctl00_WikiContent_wikiLogo 
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
src="优化性能：二维图形和图像处理.files/clear.gif"> </DIV>
<DIV class=CCS_ContentContainer id=ctl00_WikiContent_contentContainer>
<DIV class=CCS_HeaderContainer id=ctl00_WikiContent_headerContainer>
<TABLE class=CCS_Header cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD>
      <DIV class=CCS_HeaderTitle><SPAN 
      id=ctl00_WikiContent_headerTitle>社区内容</SPAN>&nbsp;&nbsp; <A 
      class=CCS_HelpLink id=ctl00_WikiContent_helpLink 
      onclick='CCS_ShowHelp("/platform/Controls/CCSection/resources/cchelp.zh-cn.htm",400,400);return false;' 
      href="http://msdn.microsoft.com/platform/Controls/CCSection/resources/cchelp.zh-cn.htm"><IMG 
      class="CCS_HelpImage  LibC_help" id=ctl00_WikiContent_helpImage 
      title=什么是社区内容？ alt=什么是社区内容？ src="优化性能：二维图形和图像处理.files/clear.gif"></A> 
      </DIV></TD></TR></TBODY></TABLE>
<TABLE class=CCS_Toolbar cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD class=CCS_Add><A class=CCS_Link id=ctl00_WikiContent_Add 
      href='javascript:WebForm_DoPostBackWithOptions(new%20WebForm_PostBackOptions("ctl00$WikiContent$Add",%20"",%20false,%20"",%20"http://msdn.microsoft.com/zh-cn/architecture/Community-Signup.aspx?ru=http%3a%2f%2fmsdn.microsoft.com%2fzh-cn%2farchitecture%2fbb613591(VS.90).aspx%3fwbi%3dnew", false, true))'>添加新内容</A> 
    </TD>
    <TD class=CCS_RecentChanges><A id=ctl00_WikiContent_recentPageLink 
      href="http://msdn.microsoft.com/zh-cn/architecture/community-edits.rss?topic=bb613591|zh-cn|90"><IMG 
      class="CCS_RSSImage LibC_rss_button" id=ctl00_WikiContent_imageRSS 
      style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
      alt=RSS src="优化性能：二维图形和图像处理.files/clear.gif" align=middle></A>&nbsp; <SPAN 
      class=CCS_RecentChangesText 
      id=ctl00_WikiContent_recentChangesTitle>批注</SPAN> </TD>
    <TD class=CCS_Profile align=right></TD></TR></TBODY></TABLE></DIV>
<DIV class=CCS_ItemsContainer id=ctl00_WikiContent_wikiItems>
<DIV id=ctl00_WikiContent_ctl00_ItemUpdatePanel>
<DIV class=CCI_Container id=ctl00_WikiContent_ctl00_Container 
style="DISPLAY: none">
<DIV class=CCI_Header id=ctl00_WikiContent_ctl00_Header>
<TABLE cellSpacing=0 cellPadding=0 width="100%">
  <TBODY>
  <TR>
    <TD align=left><SPAN class=CCI_Header_Title 
      id=ctl00_WikiContent_ctl00_HeaderTitle></SPAN></TD>
    <TD><SPAN class=CCI_Header_Spacer 
      id=ctl00_WikiContent_ctl00_Label2>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN> </TD>
    <TD class=CCI_Header_Actions align=right><SPAN 
      id=ctl00_WikiContent_ctl00_EditInfo></SPAN><SPAN 
      id=ctl00_WikiContent_ctl00_Separator>&nbsp;&nbsp;|&nbsp;&nbsp; 
      </SPAN><SPAN id=ctl00_WikiContent_ctl00_EditLabel><A class=CCI_Header_Link 
      id=ctl00_WikiContent_ctl00_Edit title=编辑此版本 
      href="javascript:__doPostBack('ctl00$WikiContent$ctl00$Edit','')">编辑</A></SPAN><INPUT 
      id=ctl00_WikiContent_ctl00_showhistoryFlag style="DISPLAY: none" 
      value=false name=ctl00$WikiContent$ctl00$showhistoryFlag> 
</TD></TR></TBODY></TABLE></DIV>
<DIV class=CCI_Text id=ctl00_WikiContent_ctl00_EditorPanel 
style="CURSOR: default">
<DIV 
onkeypress="javascript:return WebForm_FireDefaultButton(event, 'ctl00_WikiContent_ctl00_Editor_Save')" 
id=ctl00_WikiContent_ctl00_Editor_Container>
<DIV class=" CCE_Editor_Disabled" id=ctl00_WikiContent_ctl00_Editor_RadEditor 
title=按兩下以編輯這個區塊 
style="WIDTH: auto; HEIGHT: auto"><!-- 2008.2.723.35 --></DIV><INPUT 
id=ctl00_WikiContent_ctl00_Editor_editorData type=hidden 
name=ctl00$WikiContent$ctl00$Editor$editorData> <INPUT 
id=ctl00_WikiContent_ctl00_Editor_tagEditorData type=hidden 
name=ctl00$WikiContent$ctl00$Editor$tagEditorData> </DIV></DIV>
<DIV class=CCT_Panel id=ctl00_WikiContent_ctl00_TagEditor_panel>
<DIV class=CCT_TagsPanel id=tagsPanel><SPAN class=CCT_Title 
id=ctl00_WikiContent_ctl00_TagEditor_title>标记</SPAN> <A class=CCT_HelpLink 
id=ctl00_WikiContent_ctl00_TagEditor_helpLink 
onclick='CCS_ShowHelp("/platform/Controls/CCTagEditor/resources/taghelp.zh-cn.htm",800,600);return false;' 
href="http://msdn.microsoft.com/platform/Controls/CCTagEditor/resources/taghelp.zh-cn.htm"><IMG 
class="CCT_HelpImage LibC_help" id=ctl00_WikiContent_ctl00_TagEditor_helpImage 
title=这是什么？ alt=这是什么？ src="优化性能：二维图形和图像处理.files/clear.gif"></A>: <SPAN 
class=CCT_Text id=ctl00_WikiContent_ctl00_TagEditor_tags></SPAN><SPAN 
class=CCT_View id=ctl00_WikiContent_ctl00_TagEditor_view><A class=CCT_LinkButton 
id=ctl00_WikiContent_ctl00_TagEditor_addTagLink title=向本主题添加标记 
href="http://msdn.microsoft.com/Platform/Controls/CCTagEditor/#">添加标记</A> 
</SPAN><SPAN class=CCT_Edit id=ctl00_WikiContent_ctl00_TagEditor_editPanel 
style="DISPLAY: none"><INPUT class=CCT_TextBox 
id=ctl00_WikiContent_ctl00_TagEditor_textbox 
name=ctl00$WikiContent$ctl00$TagEditor$textbox autocomplete="off"> <A 
class=CCT_LinkButton id=ctl00_WikiContent_ctl00_TagEditor_addLink title=提交本主题的标记 
href="http://msdn.microsoft.com/Platform/Controls/CCTagEditor/#">添加</A> &nbsp; 
<A class=CCT_LinkButton id=ctl00_WikiContent_ctl00_TagEditor_cancelLink 
title=取消此操作 
href="http://msdn.microsoft.com/Platform/Controls/CCTagEditor/#">取消</A> 
</SPAN><SPAN class=CCT_Message 
id=ctl00_WikiContent_ctl00_TagEditor_messagePanel></SPAN></DIV>
<DIV class=CCT_FlagAsPanel id=ctl00_WikiContent_ctl00_TagEditor_flagAsPanel 
style="DISPLAY: none"><SPAN id=ctl00_WikiContent_ctl00_TagEditor_flagAsLabel>标记为 
</SPAN><A class=CCT_LinkButton 
id=ctl00_WikiContent_ctl00_TagEditor_contentBugLink 
title="将此注释标记为 'ContentBug'，作者就知道需要查看这个主题" 
onclick='return CCT_FlagContentBug("http://msdn.microsoft.com/zh-cn/architecture/Community-Signup.aspx?ru=http%3a%2f%2fmsdn.microsoft.com%2fzh-cn%2farchitecture%2fbb613591(VS.90).aspx",-1);' 
href="http://msdn.microsoft.com/Platform/Controls/CCTagEditor/#">ContentBug</A> 
</DIV>
<DIV style="CLEAR: both"></DIV></DIV></DIV></DIV></DIV>
<DIV class=CCI_Container_Edit id=ctl00_WikiContent_EditorPanel 
style="DISPLAY: none">
<DIV 
onkeypress="javascript:return WebForm_FireDefaultButton(event, 'ctl00_WikiContent_Editor_Save')" 
id=ctl00_WikiContent_Editor_Container>
<DIV class=" CCE_Editor_Disabled" id=ctl00_WikiContent_Editor_RadEditor 
title=按兩下以編輯這個區塊 style="WIDTH: auto; HEIGHT: auto"></DIV><INPUT 
id=ctl00_WikiContent_Editor_editorData type=hidden 
name=ctl00$WikiContent$Editor$editorData> <INPUT 
id=ctl00_WikiContent_Editor_tagEditorData type=hidden 
name=ctl00$WikiContent$Editor$tagEditorData> </DIV></DIV>
<DIV class=CCS_Progress id=ProgressIndicator><IMG class=LibC_spinner 
id=ctl00_WikiContent_progressImage alt=Processing 
src="优化性能：二维图形和图像处理.files/clear.gif"> </DIV>
<DIV class=CCS_Footer></DIV></DIV></DIV>
<DIV class=MsdnPage_ContentInclude id=ctl00_FooterAd align=center>
<DIV>
<DIV>
<DIV class=navpage></DIV></DIV></DIV></DIV></DIV></DIV></DIV>
<DIV class=Clearbottom></DIV>
<DIV class=bottomleftcorner></DIV>
<DIV class=bottomrightcorner></DIV>
<DIV id=Footer>
<DIV class=FooterLinks>
<DIV id=ctl00_Footer_SiteLinks><A id=ctl00_Footer_LocalFooterLink0 title=个人信息中心 
href="http://go.microsoft.com/?linkid=8786242&amp;lcid=2052">个人信息中心</A><SPAN 
class=Pipe>|</SPAN><A id=ctl00_Footer_LocalFooterLink1 title=法律信息 
href="http://www.microsoft.com/legal/">法律信息</A><SPAN class=Pipe>|</SPAN><A 
id=ctl00_Footer_LocalFooterLink2 title="MSDN Flash 中心" 
href="http://www.microsoft.com/china/msdn/newsletter/default.aspx">MSDN Flash 
中心</A><SPAN class=Pipe>|</SPAN><A id=ctl00_Footer_LocalFooterLink3 title=联系我们 
href="mailto:msdnonln@microsoft.com">联系我们</A> </DIV><SPAN class=FooterCopyright 
id=ctl00_Footer_Copyright title="© 2010  Microsoft Corporation 版权所有。 ">© 2010 
Microsoft Corporation 版权所有。 </SPAN><A id=ctl00_Footer_Terms title=保留所有权利 
href="http://msdn.microsoft.com/zh-cn/cc300389.aspx">保留所有权利</A> <SPAN 
class=Pipe>|</SPAN> <A id=ctl00_Footer_Trademarks title=商标 
href="http://www.microsoft.com/library/toolbar/3.0/trademarks/zh-cn.mspx">商标</A> 
<SPAN class=Pipe>|</SPAN> <A id=ctl00_Footer_PrivacyStatement title=隐私权声明 
href="http://www.microsoft.com/info/cn/privacy.mspx">隐私权声明</A> <A 
id=ctl00_Footer_Feedback target=_blank 
rel=sitefeedback></A></DIV></DIV></DIV></DIV></DIV></DIV>
<DIV style="DISPLAY: none"><IMG height=0 alt="Page view tracker" hspace=0 
src="优化性能：二维图形和图像处理.files/trans_pixel.gif" width=0 border=0></DIV>
<SCRIPT src="优化性能：二维图形和图像处理.files/webtrendsscript-bn20091211.js" 
type=text/javascript></SCRIPT>
<NOSCRIPT>
<DIV><IMG id=Img1 height=1 alt=DCSIMG src="优化性能：二维图形和图像处理.files/njs.gif" 
width=1></DIV></NOSCRIPT>
<SCRIPT src="优化性能：二维图形和图像处理.files/CAC5I5B0.js" type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript>
//<![CDATA[
var CCT_Controls =  new Array({id:-1,prefix:'ctl00_WikiContent_TopicTagEditor_'}, {id:-2,prefix:'ctl00_WikiContent_ctl00_TagEditor_'});
var CCE_EditorInfo =  new Array({i:-2,p:'ctl00_WikiContent_ctl00_Editor_',c:'ctl00_WikiContent_ctl00_'}, {i:-1,p:'ctl00_WikiContent_Editor_',c:''});
//]]>
</SCRIPT>

<SCRIPT type=text/javascript>
//<![CDATA[
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(CCS_BeginRequestHandler);Sys.WebForms.PageRequestManager.getInstance().add_endRequest(CCS_EndRequestHandler);CCT_Init("false","http%3a%2f%2fmsdn.microsoft.com%2fzh-cn%2farchitecture%2fbb613591.aspx");$addHandler($get("ctl00_WikiContent_TopicTagEditor_editPanel"),"keydown",CCT_KeyDown);Sys.Application.initialize();
//]]>
</SCRIPT>
</FORM>
<SCRIPT language=javascript src="优化性能：二维图形和图像处理.files/broker.js" 
type=text/javascript></SCRIPT>
</BODY></HTML>
